package longrise.phone.com.bjjt_henan.bindinginformation;

import android.content.Context;
import android.content.pm.PackageManager;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.longrise.android.FormParameter;
import com.longrise.android.Global;
import com.longrise.android.LFView;

import java.util.jar.JarEntry;

import longrise.phone.com.bjjt_henan.R;
import longrise.phone.com.bjjt_henan.Utils.CommontUtils;

/**
 * Created by Administrator on 2016/5/31.
 */
public class VersionView extends LFView {

    private Context context;

    private View view;

    public VersionView(Context context) {
        super(context);
        this.context = context;
    }

    @Override
    public View getView() {
        return view;
    }

    @Override
    public void init() {
        if (null == context) {
            return;
        }
        view = LayoutInflater.from(context).inflate(R.layout.view_version, null);
        //标题栏
        TextView titleTV = (TextView) view.findViewById(R.id.tv_title);
        titleTV.setText(R.string.cur_version);
        view.findViewById(R.id.hn_btn_back).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                OnDestroy();
                closeForm();
            }
        });
        TextView nameTV = (TextView) view.findViewById(R.id.version_tv);
        nameTV.setText(Global.getInstance().getVersionName());
    }

    @Override
    public FormParameter getFormParameter() {
        FormParameter form = new FormParameter();
        form.setShowtitle(false);
        return form;
    }

    @Override
    public void refreshByTime() {

    }

    @Override
    public void refresh() {

    }

    @Override
    public void OnDestroy() {
        super.OnDestroy();
        view = null;
    }
}
